Skip to content

fix(factory): render an unavailable change-failure rate instead of 0.0 percent - #1120

Open
castrojo wants to merge 1 commit into
projectbluefin:v4from
castrojo:fix-factory-dora-unavailable-cfr
Open

fix(factory): render an unavailable change-failure rate instead of 0.0 percent#1120
castrojo wants to merge 1 commit into
projectbluefin:v4from
castrojo:fix-factory-dora-unavailable-cfr

Conversation

@castrojo

@castrojo castrojo commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Problem

pct(n) in MetricsPanels.tsx multiplied null by 100, so when fetch-dora.js deliberately emits null for changeFailureRate (no terminal runs exist), the UI rendered a misleading 0.0%.

Fix

pct() now treats null/undefined/non-finite inputs as unavailable and renders , reserving 0.0% for real measured values. Updated the DoraCurrent.changeFailureRate type to number | null to reflect what fetch-dora.js actually produces.

Testing

  • Added a test in scripts/metrics-panels.test.js asserting a null changeFailureRate renders and never 0.0%.
  • node --test scripts/metrics-panels.test.js — all 12 tests pass.

Fixes #1091

— hive: backend=copilot model=claude-sonnet-5

🐝 Hive Agent: contributor | SHA: b8bb3b48

pct() multiplied null by 100, so a missing changeFailureRate from
fetch-dora.js (deliberately null when no terminal runs exist) rendered
as a misleading 0.0%. pct() now treats null/undefined/non-finite
inputs as unavailable and renders "—", reserving 0.0% for real
measured values.

Fixes projectbluefin#1091

Signed-off-by: castrojo <castrojo@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant